mixin post(cateslist, update, article)

  form.articlepost(autocomplete="on", onsubmit='return false;')
    dl
      dt 文章标题
      dd <input id='title' type='text' value="#{article?article.title:''}">
    dl
      dt 所属分类
      dd.prel <input id='cates' type='text' value="#{article?article.cates:''}">
        if cateslist
          ul#cateslist.cateslist
            for i in cateslist
              li #{i.cname}
    dl
      dt 发表日期
      dd <input id='date' type='text' readonly onclick='laydate()' value="#{article?article.date:''}">
    dl
      dt 文章作者
      dd <input id='author' type='text' value="#{article?article.author:''}">
    dl
      dt 文章 id
      dd <input id='articleid' type='text' placeholder="*必填", value="#{article?article.articleid:''}">
    dl
      dt 首页图片id
      dd <input id='imgid' type='text' value="#{article?article.imgid:''}" placeholder="可选">
    dl.textarea
      dt 文章摘要<em>(选填)</em>
      dd
        textarea#summary(name="summary")= article?article.summary:''
    
    if update
      label(for='update') <input id='update' class="fl" type='checkbox' checked disabled> 更新现有文章?
    else
      label(for='update') <input id='update' class="fl" type='checkbox'> 更新现有文章?
    button#savePost(type='submit') 发表文章
